Skip to main content

DescribeMetricLast

Description

call the DescribeMetricLast interface to query the latest monitoring data of the specified monitoring object.

Request Method

POST

Request Path

/apsara/route/cms/DescribeMetricLast

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
MetricNameBODYstringYesCPUUtilizationmonitoring item name.
ExpressBODYstringNo{"groupby":["userId","instanceId"]}expression for real-time calculation of existing query results.
EndTimeBODYstringNo2019-01-31 10:10:00end time. The format is Unix timestamp, which is the number of seconds passed from January 1, 1970. indicates that can only query monitoring data within 270 days.
NextTokenBODYstringNo15761432850009dd70bb64cff1f0fff6c0b08ffff073be5fb1e785e2b020f7fed9b5e137bd810a6d6cff5ae****the identity of the paging cursor. If the return result of the matching query condition exceeds the paging size, this paging cursor will be returned. if you need to obtain the next page data, you can use the returned cursor value as the request parameter until no cursor value is returned, indicating that all the result data has been obtained.
LengthBODYstringNo1000returns the size of each page of monitoring data for paging query. /p> the default value is 1000, that is, 1000 pieces of monitoring data per page.
regionIdBODYstringYesNo sample value for this parameter.region id
StartTimeBODYstringNo2019-01-31 10:00:00start time. The format is Unix timestamp, which is the number of seconds passed from January 1, 1970. description can only query monitoring data within 270 days and the start time and end time do not exceed 31 days.
DimensionsBODYstringNo[{"instanceId":"XXXXXX"}]dimension map, which is used to query the monitoring data of specified resources. format key-valuekey-value pair A collection of forms, commonly used key-value set as instanceId:XXXXXX. key and value has a length of 1-64 bytes, intercept the first 64 bytes when it exceeds 64 bytes. key and value values can include letters, numbers, dots (.), hyphens (-), underscores (_), forward slashes (/), and backslashes (\). description Dimensions JSON string is required to represent the map object when passing in, which must be passed in in sequence.
PeriodBODYstringNo60The time interval is usually the reporting period of monitoring items, and the unit is seconds. If you do not fill it in, query the original data according to the reporting cycle stated when registering the monitoring item. if a statistical period is set when setting an alarm rule, the corresponding statistical data will be queried according to this period.
versionBODYstringNo2016-01-01version of api
NamespaceBODYstringYesacs_ecs_dashboardThe data namespace of the product is used to distinguish different products. Naming method: acs_product name.

Return data

NameTypeSample valueDescription
RequestIdstringNo sample value for this parameter.request ID.
NextTokenstringNo sample value for this parameter.paging cursor ID.
MessagestringNo sample value for this parameter.error message.
PeriodstringNo sample value for this parameter.time interval, in seconds.
DatapointsstringNo sample value for this parameter.monitoring data list.
CodestringNo sample value for this parameter.status code. description status code 200 indicates success.
SuccessbooleanNo sample value for this parameter.whether the request was successful.

Example

Successful Response example

"The successful response sample is not recognizable. Please modify API definition in API gateway before re-create the API document."

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}